﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using Tapt.Common;

namespace Tapt.Web
{
    public partial class SiteMaster : MasterPage
    {
        // Top tab
        public HeaderActiveLink ActiveTopTab
        {
            get;
            set;
        }

        //Ajax Pro
        private Type _ajaxType = null;
        private string _ajaxString;
        public string AjaxProPath
        {
            get
            {
                if(_ajaxType == null || string.IsNullOrEmpty(_ajaxString)) return string.Empty;
                string path = "/ajaxpro/Tapt.Web." + _ajaxString + "," ;
                path += _ajaxType.Assembly.FullName.Split(',')[0];
                path += ".ashx";
                return path;
            }
        }    
        public void SetAjaxPro(Type type, string className)
        {
            _ajaxType = type;
            _ajaxString = className;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page is _Default)
            {
                SideTopHomeLink.Visible = false;
            }
        }
    }
}